package com.smart.manager.member.entities.bodys;

import com.smart.common.entities.core.BaseSearch;
import com.smart.manager.member.entities.enums.CoinAccountEvent;
import io.ebeaninternal.server.util.Str;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;


/**
 * @author xiaxuqiu
 * @date 2023/03/26
 */
public class RMemberAccount {

    @Data
    @EqualsAndHashCode(callSuper = true)
    @ApiModel("RMemberProfileAddress1")
    public static class SearchBody extends BaseSearch {




        @ApiModelProperty("会员昵称")
        private String  nickName;

        @ApiModelProperty("手机号码")
        private String  phoneNumber;


    }


    @Data
    @ApiModel("RMemberProfileAddress2")
    public static class FindBillBody implements Serializable {


        @ApiModelProperty("会员编号")
        @NotNull(message = "会员信息 不能为空")
        private Long memberId;


        @ApiModelProperty("查询时段")
        @NotBlank(message = "查询时段 不能为空")
        private String dateRange;


    }

    @Data
    @ApiModel("RMemberProfileAddress3")
    public static class ChangeCoinBody implements Serializable {


        @ApiModelProperty("会员编号")
        @NotNull(message = "会员信息 不能为空")
        private Long memberId;


        @ApiModelProperty("调整类型")
        @NotNull(message = "调整类型 不能为空")
        private CoinAccountEvent event;

        @ApiModelProperty("查询时段")
        @NotNull(message = "查询时段 不能为空")
        @Min(value = 1, message = "金币调增数量不能少于1")
        @Max(value = 1000000, message = "金币调增数量不能超过100000")
        private Integer quantity;


        @ApiModelProperty("调整原因")
        @NotBlank(message = "调整原因 不能为空")
        @Length(max = 200, message = "调整原因不能超过200字")
        private String remark;


    }


}
